<?php

namespace com\aristo\ingenieros\view;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ReceiptView
 *
 * @author ARISTO INGENIEROS
 */
class ReceiptView {

    private $id;
    private $nrorecibo;
    private $nrovoucher;
    private $fecha;
    private $persona;

    function __construct() {
        $this->id = NULL;
        $this->nrorecibo = NULL;
        $this->nrovoucher = NULL;
        $this->fecha = NULL;
        $this->persona = NULL;
    }

    public function getId() {
        return $this->id;
    }

    public function setId($id) {
        $this->id = $id;
    }

    public function getNrorecibo() {
        return $this->nrorecibo;
    }

    public function setNrorecibo($nrorecibo) {
        if ($nrorecibo > 0 && $nrorecibo != NULL && $nrorecibo != "") {
            $this->nrorecibo = str_pad("" + $nrorecibo, 10, "0", STR_PAD_LEFT);
        }
    }

    public function getNrovoucher() {
        return $this->nrovoucher;
    }

    public function setNrovoucher($nrovoucher) {
        $this->nrovoucher = (strtoupper($nrovoucher) != "NULL")?$nrovoucher:"";
    }

    public function getFecha() {
        return $this->fecha;
    }

    public function setFecha($fecha) {
        $this->fecha = $fecha;
    }

    public function getPersona() {
        return $this->persona;
    }

    public function setPersona($persona) {
        $this->persona = $persona;
    }

    public function toJSON() {
        return get_object_vars($this);
    }

}